package app.services.impl;

import app.models.Perfil;
import app.repositories.PerfilRepository;
import app.repositories.Repository;
import app.services.PerfilService;
import br.com.caelum.vraptor.ioc.Component;

@Component
public class PerfilServiceImpl extends GenericServiceImpl<Perfil, Long> implements PerfilService {

	private final PerfilRepository repository;
	
	public PerfilServiceImpl (PerfilRepository repository){
		this.repository = repository;
		super.setGenericRepository((Repository<Perfil, Long>) repository);
	}
	
	public Perfil findPerfilByName(String perfilName){
		return repository.findPerfilByName(perfilName);
	}

}
